home *** CD-ROM | disk | FTP | other *** search
/ Die Speccy' 97 / Die Speccy' 97.iso / amiga_system / the_aminet / comm / bbs / trinitybbs20.lha / Arexx.Doc next >
Text File  |  1995-09-26  |  25KB  |  488 lines

  1.  
  2.                              The Unauthorized
  3.  
  4.               C N e t   A R e x x   C o m m a n d   L i s t
  5.               =============================================
  6.  
  7.                                 By Le Chat
  8.  
  9.                         Current for CNet/3 v2.42e
  10.  
  11.         This  list  is  compiled  from,  but  not  exclusively, Perspective
  12.         Software's CNet SysOp Manual  and  Beta  Release update notes.  The
  13.         five digit GETUSER lists are  courtesy  of  a Future World user who
  14.         didn't sign his  name  to  the  file  that  I  downloaded  (I hope,
  15.         whomever he is, that he doesn't mind me including his list here).
  16.  
  17.         The data contained in  this  text  file  is intended for registered
  18.         CNet SysOps only.  I can not  guarantee  the accuracy of any of the
  19.         information in this file  (especially the extended GETUSER listings
  20.         - I rarely use those  anyway).   Most  of  the commands, however, I
  21.         have tried myself, and they  work.  Where possible, I have expanded
  22.         upon, corrected, and/or  updated  information  originally  given by
  23.         Perspective Software.  The usage notes are entirely my own work.
  24.  
  25.  
  26.         ADDKEYS {string} - Adds a  string  of  characters  into  the port's
  27.                            input buffer.  This can be useful for automating
  28.                            logons or pre-inputting  data  (i.e.  if  a game
  29.                            asks a user for  a  handle  to use for the game,
  30.                            prior to receiving or querying for the handle an
  31.                            ADDKEYS call can input the user's current handle
  32.                            as  a  default).   Use  d2c(13)  or  d2c(10)  to
  33.                            represent a carriage return.
  34.  
  35.         ADDPOINTS {string} - Addpoints adds a  number  of  'points'  to the
  36.                              user's Game Points total.
  37.  
  38.         ADDTIME {string} - Adds a  number  of  minutes  to  the user's time
  39.                            remaining  for  the  total  day.   Use  negative
  40.                            numbers to subtract.
  41.  
  42.         BAUD {number} - Set the current baud rate to {number}
  43.  
  44.         BBSCOMMAND {string} - Attempt to  execute  a  BBS command {string}.
  45.                               The   command   must    be    an   all-prompt
  46.                               (everywhere) command  such  as  WHO,  STATUS,
  47.                               TIME, etc.  My experience  has shown that WH,
  48.                               ST, T, etc. work just  as well.  You can also
  49.                               issue this command  without  any arguments to
  50.                               allow a  check  for  OLMs  when  your  script
  51.                               wouldn't  otherwise   allow   OLMs   to  pass
  52.                               through.
  53.  
  54.         BBSIDENTIFY {argument} - Returns  the  following   for   the  given
  55.                                  arguments:
  56.  
  57.                   {argument}      RESULT
  58.                   ABBEREXX        "1.0"
  59.                   BBS             Current CNet version
  60.                   EMULATION       "ASCII" or "ANSI"
  61.                   NAME            Your BBS's name as set in CONFIG
  62.                   SYSOP           SysOp's name as set in CONFIG
  63.                   TERM            <baud> <columns> <rows> <line>
  64.                   USER            "<username>" "<callingfrom>" <access>
  65.                                   <access> will be GUEST for new users
  66.                                   MEMBER for other users
  67.                                   SYSOP for account #1
  68.                                   CO-SYSOP  for  accounts  with maintenance
  69.                                   access
  70.  
  71.         CALLEDITOR {number} - This invokes the  user's default editor.  The
  72.                               current contents  of  the  editor  is loaded.
  73.                               The number  parameter  specifies  the maximum
  74.                               number of lines to  input (it will not exceed
  75.                               the user's predefined  maximums).   Passing a
  76.                               zero  will  use  the  user's  default.  After
  77.                               exiting the editor,  "1" indicates the buffer
  78.                               contains data, and a "0" indicates the buffer
  79.                               is empty.
  80.  
  81.         CHANGEWHAT {string} - Change WHAT command the user last used in the
  82.                               control panel and status window.
  83.  
  84.         CHANGEWHERE {string} - Set the user's ACTION  field  in the WHO and
  85.                                Control Panel.
  86.  
  87.         CHECKABORT - Returns a one  if  a  user  has  pressed  Control-C or
  88.                      SPACEBAR, and a  zero  otherwise.   Each time there is
  89.                      output this will be reset, so you should only use this
  90.                      command  immediately  after  sending  out  data  (i.e.
  91.                      immediately after a SENDFILE and the like).
  92.  
  93.         CHECKIO - Returns either a '1' or a '0' depending on whether or not
  94.                   there are characters  waiting  to  be  input using either
  95.                   QUERY, GETCHAR, or RECEIVE.  It is a BAD idea to use this
  96.                   command in any  type  of  LOOP,  as  this could SERIOUSLY
  97.                   degrade the  performance  of  a  multi-user  system.  (My
  98.                   experience with using this command  in a LOOP didn't seem
  99.                   to have any effect on  any  other  ports - maybe I lucked
  100.                   out.)  You can alternatively  use  the MAYGETCHAR command
  101.                   if you want to poll  for a character without halting your
  102.                   script instead of continually issuing CHECKIO looking for
  103.                   input.
  104.  
  105.         CLEAREDITOR - Clears the contents of  the temp editor file.  Useful
  106.                       before you STARTEDITOR or if you do not LOADEDITOR.
  107.  
  108.         CLOSEDISPLAY - Close the port screen or workbench window.
  109.  
  110.         CLS - Sends the clear screen code.
  111.  
  112.         DROPCARRIER - Disconnects the  caller,  but  does  not  perform any
  113.                       additional reset commands.
  114.  
  115.         FEEDBACK - Does the same  thing  as  BBSCOMMAND  F  - initiates the
  116.                    standard feedback.
  117.  
  118.         FINDACCOUNT {string} - Passing  a  handle  or  account  number will
  119.                                search for that account.   If  the handle is
  120.                                not  an  exact   match,  the  handle  search
  121.                                procedure will be  initiated.   The function
  122.                                returns the account number if no problem was
  123.                                found; otherwise, a zero  is passed back.  A
  124.                                future release may return  a  -1 if you pass
  125.                                an account  number  that  exceeds  the total
  126.                                number of accounts on the system.
  127.  
  128.         GETCARRIER - Result contains either "TRUE"  or "FALSE" depending on
  129.                      the carrier  detect  signal  status  from  the  serial
  130.                      device.
  131.  
  132.         GETCHAR - Pauses for a character to  enter the port's input buffer.
  133.                   The key will be placed into RESULT.  See also MAYGETCHAR.
  134.  
  135.         GETSCRATCH {string} - Operates like GETUSER,  but reads the scratch
  136.                               user  structure.   Use  LOADSCRATCH  to  load
  137.                               other  user  information   into  the  scratch
  138.                               buffer.
  139.  
  140.         GETUSER {number} - Used to pull  various  pieces  of  the user data
  141.                            file into the  ARexx  program.   The  number may
  142.                            take on the following values:
  143.  
  144.                1       User's Handle
  145.                2       User's Password
  146.                3       Users's full real name
  147.                4       User's City and State
  148.                5       User's Zip Code
  149.                6       User's Street address
  150.                7       Time remaining (minutes)
  151.                8       SysOp Comment
  152.                9       User's Voice Phone Number
  153.                10      User's Data Phone Number
  154.                11      Last call date
  155.                12      Current date and time (affected by Edit Preferences'
  156.                        Time Zone!)
  157.                13      Number of mail items waiting
  158.                14      Number of new mail items waiting
  159.                15      User's access group (0-23)
  160.                16      Access group name
  161.                17      System maintenance.  0==No,  anything else==Yes
  162.                18      Number of minutes used today
  163.                19      Screen clear code (returns 12==`L)
  164.                20      Reserved for future use
  165.                21      Users's game points
  166.                22      Total calls to the system by user
  167.                23      The current port number
  168.                24      The current CPS (baud rate divided by ten)
  169.                25      User's FILE RATIO default (#1)
  170.                26      User's BYTE RATIO default (#1)
  171.                27      Current line width (e.g. 40 or 80)
  172.                28      Terminal type (0=Dumb, 1=C/G, 2=ANSI, 3=IBM, 4=Sky)
  173.                29      Default protocol
  174.                30      Total uploaded kbytes
  175.                31      Total uploaded files
  176.                32      Total downloaded kbytes
  177.                33      Total downloaded files
  178.                34      File credits
  179.                35      Byte credits
  180.                36      Total public messages
  181.                37      Total private messages
  182.                38      User's WHO banner
  183.                39      UUCP User directory
  184.                40      User's account number
  185.                41      User's unique ID number
  186.                42      Bytes uploaded today
  187.                43      Bytes downloaded today
  188.                44      Files uploaded today
  189.                45      Files downloaded today
  190.  
  191.                Alternatively,  you  have  the   option  of  specifying  ANY
  192.                variable  in  either  of  the  CNet's  PortData  or MainPort
  193.                structures by using the format XT##### where:
  194.  
  195.                X:  1==PortData, 2==MainPort
  196.                T:  1==char, 2==short integer,  4==long  integer, 3==string,
  197.                    5==IsDate, 6==CHAR *
  198.                #:  Must be a FIVE  DIGIT  offset  from the beginning of the
  199.                    structure.  CNET.H has  been  labelled  with the offsets
  200.                    for  several  of  the  important  structures  (MainPort,
  201.                    PortData,  and  UserData  for  the  use  with  user1  of
  202.                    PortData).
  203.  
  204.                The following are some  extended  GETUSER values complied by
  205.                another CNet SysOp.  I have  not  verified that all of these
  206.                work.  Remember that you can  NOT use these with the scratch
  207.                user buffer (GETSCRATCH).
  208.  
  209.                Main Port Data:
  210.                2203094      ID# of who's on port 0 (-1=no one)
  211.                2203096      ID# of who's  on  port  1  -  add four for each
  212.                             successive port
  213.                2600096      What user on port 0 is doing
  214.                2600100      What user on port  1  is  doing  - add four for
  215.                             each successive port
  216.                2314266      last user on the BBS (independent of port)
  217.  
  218.                User Port Data:
  219.                1307444      Previous command in buffer
  220.                1400026      Time left this call
  221.                1400030      Time used this call
  222.                1200600      Calls per day
  223.                1200682      Time limit per call
  224.                1200680      Call limit per day
  225.                1200016      Age of user
  226.                1200012      Account Number
  227.                1200018      Baud Rate (Divided by ten)
  228.                1400068      Unique Serial ID Number
  229.                1300072      User's Handle
  230.                1300093      User's Full Real Name
  231.                1300119      User's Street Address
  232.                1300150      User's City and State
  233.                1300181      User's Zip Code
  234.                1300192      User's Country
  235.                1300200      User's Voice Phone Number (?)
  236.                1300217      User's Password
  237.                1300232      SysOp Comment
  238.                1300266      User's Macro 1
  239.                1300302      User's Macro 2
  240.                1300338      User's Macro 3
  241.                1300374      User's Macro 4
  242.                1500410      User's Birthdate
  243.                1500416      User's Firstcall date to the BBS
  244.                1500422      User's Lastcall date
  245.                1500428      Number of new mail items (?)
  246.                1500434      Current Baud Rate (?)
  247.                1500440      Expansion? - reserved for future expansion
  248.                1100446      User's Access Group (0-23)
  249.                1100447      User's Expiration Group (0-23)
  250.                1400448      User's Expiration Date
  251.                1100452      Current BBSText in use
  252.                1100453      24 hour or AM/PM  Time form
  253.                1100454      MorePrompt selection
  254.                1100455      LineFeeds selection
  255.                1100456      Paranoia selection
  256.                1100457      User's Time Zone
  257.                1100458      ANSI Colors selection
  258.                1100459      ANSI tabs selection
  259.                1100460      ANSI selection
  260.                1100461      Gender - male/female
  261.                1100462      AutoMore selection
  262.                1100463      Term Type (Dumb, ANSI, IBM, C/G)
  263.                1100464      Help Level (Novice, etc.)
  264.                1100465      Computer type
  265.                1100466      Default Protocol
  266.                1100467      Terminal Width (number of columns)
  267.                1100468      Terminal Length (number of rows)
  268.                1100469      Mailbox Open
  269.                1200470      Foward Mail To User
  270.                1400472      Total Calls to the system
  271.                1400476      Number of Public Msgs
  272.                1400480      Number of Private Msgs
  273.                1400484      Total Upload Bytes
  274.                1400488      Total Upload Files
  275.                1400492      Total Download Bytes
  276.                1400496      Total Download Files
  277.                1400500      Total File Credits Remaining
  278.                1400504      Total Byte Credits Remaining
  279.                1400508      Total Time Credits
  280.                1400512      Balance
  281.                1400516      NetCredits
  282.                1400520      DoorPoints
  283.                1400524      Total Bytes Uploaded Today
  284.                1400528      Total Downloaded Bytes Today
  285.                1200532      Total Uploaded files for the day
  286.                1200534      Total Downloaded files for the day
  287.                1200536      Total Calls Today
  288.                1200538      Time Today Used Today
  289.                1200540      Number of bad Logon Attempts
  290.  
  291.                Subboard Port Data:
  292.                1206202      current item number
  293.                1206366      total number of items
  294.                1310688      title of item
  295.                1309752      Path for  direct  exchange  subboard (or udbase
  296.                             path for sub?)
  297.                1410780      Size in bytes of current file (0=message)
  298.                1510046      EITHER the date of  last  visit OR new date for
  299.                             current subboard
  300.  
  301.         HANGUP - Same as DROPCARRIER.
  302.  
  303.         IREADY - Same as CHECKIO.
  304.  
  305.         LOADEDITOR {path} - This will read the  filename  given by the path
  306.                             into the temp editor buffer.
  307.  
  308.         LOADSCRATCH {number} - If  passed  a  valid  account  number,  that
  309.                                user's account  information  will  be loaded
  310.                                into the scratch  buffer.   A  result of "0"
  311.                                indicates  a  load  error  (invalid  account
  312.                                number), and "1" indicates everything loaded
  313.                                correctly.
  314.  
  315.         LOGENTRY {string} - Writes a string  into  your  call  log (no need
  316.                             terminate the line  with  a  carriage return or
  317.                             line feed).
  318.  
  319.         MAYGETCHAR - Returns the waiting-input character or "NOCHAR" if the
  320.                      input buffer is empty.
  321.  
  322.         MODEM {number} - The passed number must be one of the following:
  323.                            0 - Close Serial Device
  324.                            1 - Re-Open  the   serial   device   for  normal
  325.                                operation.
  326.                            2 - Do not close the  serial  device but inhibit
  327.                                all modem related I/O.
  328.  
  329.         NEWLINE - Sends the newline code.
  330.  
  331.         OPENDISPLAY - Attempt  to  open  the  port's  screen  or  WorkBench
  332.                       window.  It may take a few seconds for the display to
  333.                       open.
  334.  
  335.         PRINT {string} - Same as TRANSMIT.
  336.  
  337.         PROMPT <length> {argument} '"<prompt>"'
  338.                <length> is the maximum number of characters to input.
  339.                {argument} is one of:
  340.                      NORMAL
  341.                      HIDE      : password input
  342.                      YESNO     : Yes/No with Yes as default
  343.                      NOYES     : Yes/No with No as default
  344.                <prompt> must be surrounded by double quotes and then single
  345.                quotes so AREXX  will  actually  send  the  double quotes to
  346.                CNet.  This will be the prompt string.
  347.  
  348.                The result will contain the inputted string.
  349.  
  350.         PUTSCRATCH {number} - This takes the same  (two digit) arguments as
  351.                               GETSCRATCH except, it will place whatever was
  352.                               passed to SETOBJECT  into the scratch buffer.
  353.                               The data will  not  be  saved into the user's
  354.                               actual data structures until to SAVESCRATCH.
  355.  
  356.         PUTUSER {number} - Operates analogously to  GETUSER except that the
  357.                            object last set using the SETOBJECT command will
  358.                            be  PUT  into  memory.   This  is  an  extermely
  359.                            powerful feature, and must  be used with extreme
  360.                            care.
  361.  
  362.         QUERY {string} - Uses the supplied string  as  a prompt; otherwise,
  363.                          this command is identical to RECEIVE.
  364.  
  365.         RECEIVE - Pauses for the user to  input  a  line.  The line of text
  366.                   will appear in the RESULT variable.
  367.  
  368.         RESETMODEM - Sends the initialization  strings  to  the  modem, and
  369.                      resets the baud rate according to the BBSPORT file.
  370.  
  371.         SAVEEDITOR {path} - Write the contents of the temp editor buffer to
  372.                             the file specified  by  the  path.  If the file
  373.                             already  exists,  it  will  be  overwritten.  A
  374.                             result of one  indicates everything was written
  375.                             correctly;  otherwise,  "0"  is  some  type  of
  376.                             error.
  377.  
  378.         SAVESCRATCH {number} - This will  take  the  current scratch buffer
  379.                                and save it to  whatever  account number you
  380.                                have supplied.  Be careful with this command
  381.                                - it can be  VERY dangerous.  I believe this
  382.                                command returns  a  "1"  if everything saved
  383.                                properly and a  "0"  otherwise (i.e. account
  384.                                number invalid).
  385.  
  386.         SCREENOUT {string} - Displays a string, but  only to the screen and
  387.                              not to the modem.
  388.  
  389.         SENDFILE {path} - Displays the text file  specified by the supplied
  390.                           path and filename.   MCI  codes  and ANSI will be
  391.                           interpreted.
  392.  
  393.         SENDMODEM {string} - Sends a string to  the  modem,  but not to the
  394.                              screen.
  395.  
  396.         SENDSTRING {string} - Identical  to  TRANSMIT  except  it  will not
  397.                               append a carriage return (advance to the next
  398.                               line automatically)
  399.  
  400.         SEND {string} - Send the passed string  without  any translation of
  401.                         any kind.  (no MCI, etc.)
  402.  
  403.         SETMAILSUBJ {string} - This command should be performed before EACH
  404.                                WRITEMAIL  command  in   order  to  set  the
  405.                                SUBJECT of the mail about to be sent.
  406.  
  407.         SETMINFREE {number} - This command  tells  CNet  when  to  STOP  an
  408.                               upload-in-progress  due   to   critical  disk
  409.                               space.  The passed value should be the lowest
  410.                               free-BYTES on the hard drive.
  411.  
  412.         SETNODELOCATION {string} - Same as CHANGEWHERE.
  413.  
  414.         SETOBJECT {string} - This must  be  used  before  each  PUTUSER  or
  415.                              PUTSCRATCH.   This  command   will  place  the
  416.                              supplied string into a  buffer until a PUTUSER
  417.                              or PUTSCRATCH is issued.
  418.  
  419.         SETPROTOCOL {character} - This command should be used before XUP or
  420.                                   XDN.  The passed  character  should match
  421.                                   one of those given  in the protocols menu
  422.                                   of the CONFIG program.  You can allow the
  423.                                   user to specify the  protocol  by using a
  424.                                   null string ("").
  425.  
  426.         SHUTDOWN - This is a null  command  which  does nothing and is only
  427.                    added for compatibility.
  428.  
  429.         SPAWN {path} - Asynchronously runs  another  ARexx  file.   This is
  430.                        useful  for  starting  another  program  just before
  431.                        exiting the first program.
  432.  
  433.         SYSOPLOG {string} - Same as LOGENTRY.
  434.  
  435.         TRANSMIT {string} - Sends the string  to  the  screen and modem.  A
  436.                             carriage   return   is   added   to   the   end
  437.                             (automatically advances to the next line).
  438.  
  439.         VERSION - Returns the  "CNet  AMIGA  2.XX"  version  number  to the
  440.                   result variable.
  441.  
  442.         WRITEMAIL {number} - Write the  contents  of  the  temporary editor
  443.                              buffer  to  the   user's   mailbox  specified.
  444.                              Result will carry a "1" if everything was sent
  445.                              OK, "0" otherwise.
  446.  
  447.         XDN {path} - This command will send the specified path and filename
  448.                      to the  user.   The  command  SETPROTOCOL  is  used to
  449.                      select which protocol will be used.
  450.  
  451.         XUP {path} - This command works similiarly to  XDN,  but if a batch
  452.                      protocol is used, the path only need to be specified.
  453.  
  454.         
  455.  
  456.         Notes:
  457.         ======
  458.  
  459.         You may address any CNet port with ADDRESS CNETREXX# where # is the
  460.         port number you wish to access 0,  1,  2, ..., 22, and 23.  If this
  461.         address is being made from  another  port,  it will NOT release the
  462.         original port, so be careful if  you address another port and issue
  463.         command like SENDFILE, QUERY,  etc.;  the  calling port will not be
  464.         released until the other port has "exited" the command, etc.
  465.  
  466.         QUERY,  RECEIVE,  GETCHAR,  MAYGETCHAR,   and  PROMPT  will  return
  467.         ###PANIC if the user has dropped  carrier or run out of time.  Make
  468.         your scripts robust by always checking for this result.
  469.  
  470.         It is a bad idea to use GETUSER  7 to determine the time of the day
  471.         in games that only allow  users  to  play  once or day or something
  472.         because this time is easly  adjusted  in the preferences menu which
  473.         can allow  users  to  cheat  in  your  game.   Use  GETUSER  7  for
  474.         displaying time  to  the  user,  and  use  the  DATE() function for
  475.         keeping up with actual dates.
  476.  
  477.         General Information:
  478.         ===================
  479.  
  480.         You can contact Le Chat by sending netmail to:
  481.  
  482.                     FIDONET  Le Chat @   1:3800/26.0
  483.                     CLINK    Le Chat @ 911:5162/0.0
  484.  
  485.         Or by EMail on CNet's support board, Future World, to Gate Keeper.
  486.  
  487.         Our Home BBS is (504)272-2000 3/12/24/HST - all are welcome.
  488.